#!/usr/bin/bash

#准备目录
echo "准备目录========="
mkdir ~/lotusDir
mkdir ~/lotusDir/history
touch ~/lotusDir/history/lotus-wallet.history
touch ~/lotusDir/history/lotus-storage-miner-init.history
touch ~/lotusDir/history/lotus-storage-miner-send.history

mkdir ~/lotusDir/log
sh ./lotus-log-make.sh

mkdir ~/tmpdir
mkdir ~/tmpdir/tmp
mkdir ~/tmpdir/tmpdir
echo "准备目录 完成========="

#环境变量
echo "设置环境变量========="
echo 'export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/"' >> ~/.bashrc
echo "export FIL_PROOFS_PARAMETER_CACHE=$HOME/lotusDir/proof-parameters" >> ~/.bashrc
echo "export LOTUS_PATH=$HOME/lotusDir/.lotus" >> ~/.bashrc
echo "export LOTUS_STORAGE_PATH=$HOME/lotusDir/.lotusstorage" >> ~/.bashrc
echo "export TMPDIR=$HOME/tmpdir/tmp" >> ~/.bashrc
echo "设置环境变量 完成========="

echo "请输入显卡参数，格式：类型:GPU单元数 ( 如 GeForce GTX 1080 Ti:3584 )"
read v
echo "export BELLMAN_CUSTOM_GPU=\"${v}\"" >> ~/.bashrc

sh ./lotus-mount.sh